﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="DTcms.Web.UI.Page.usercenter" ValidateRequest="false" %>
<%@ Import namespace="System.Collections.Generic" %>
<%@ Import namespace="System.Text" %>
<%@ Import namespace="System.Data" %>
<%@ Import namespace="DTcms.Common" %>

<script runat="server">
override protected void OnInit(EventArgs e)
{

	/* 
		This page was created by DTcms Template Engine at 2016/1/11 15:08:36.
		本页面代码由DTcms模板引擎生成于 2016/1/11 15:08:36. 
	*/

	base.OnInit(e);
	StringBuilder templateBuilder = new StringBuilder(220000);
	templateBuilder.Append("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n<title>会员中心 - ");
	templateBuilder.Append(Utils.ObjectToStr(config.webname));
	templateBuilder.Append("</title>\r\n<meta content=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webkeyword));
	templateBuilder.Append("\" name=\"keywords\" />\r\n<meta content=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webdescription));
	templateBuilder.Append("\" name=\"description\" />\r\n<link media=\"screen\" type=\"text/css\" href=\"");
	templateBuilder.Append("/templates/green");
	templateBuilder.Append("/css/style.css\" rel=\"stylesheet\" />\r\n<script type=\"text/javascript\" src=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("scripts/jquery/jquery-1.10.2.min.js\"></");
	templateBuilder.Append("script>\r\n<script type=\"text/javascript\" src=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("scripts/lhgdialog/lhgdialog.js?skin=idialog\"></");
	templateBuilder.Append("script>\r\n<script type=\"text/javascript\" src=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("scripts/calendar.js\"></");
	templateBuilder.Append("script>\r\n<script type=\"text/javascript\" src=\"");
	templateBuilder.Append("/templates/green");
	templateBuilder.Append("/js/base.js\"></");
	templateBuilder.Append("script>\r\n</head>\r\n\r\n<body>\r\n<!--Header-->\r\n");

	templateBuilder.Append("<!-- header-container start -->\r\n			<div class=\"header-container\">\r\n				\r\n				<!-- header-top start -->\r\n				<!-- classes:  -->\r\n				<!-- \"dark\": dark version of header top e.g. class=\"header-top dark\" -->\r\n				<!-- \"colored\": colored version of header top e.g. class=\"header-top colored\" -->\r\n				<!-- ================ -->\r\n				<div class=\"header-top dark \">\r\n					<div class=\"container\">\r\n						<div class=\"row\">\r\n							<div class=\"col-xs-3 col-sm-6 col-md-9\">\r\n								<!-- header-top-first start -->\r\n								<!-- ================ -->\r\n								<div class=\"header-top-first clearfix\">\r\n									<ul class=\"social-links circle small clearfix hidden-xs\">\r\n										<li class=\"twitter\"><a target=\"_blank\" href=\"http://www.twitter.com\"><i class=\"fa fa-twitter\"></i></a></li>									\r\n										<li class=\"linkedin\"><a target=\"_blank\" href=\"http://www.linkedin.com\"><i class=\"fa fa-linkedin\"></i></a></li>\r\n										<li class=\"googleplus\"><a target=\"_blank\" href=\"http://plus.google.com\"><i class=\"fa fa-google-plus\"></i></a></li>										\r\n										<li class=\"facebook\"><a target=\"_blank\" href=\"http://www.facebook.com\"><i class=\"fa fa-facebook\"></i></a></li>\r\n									</ul>\r\n									<div class=\"social-links hidden-lg hidden-md hidden-sm circle small\">\r\n										<div class=\"btn-group dropdown\">\r\n											<button type=\"button\" class=\"btn dropdown-toggle\" data-toggle=\"dropdown\"><i class=\"fa fa-share-alt\"></i></button>\r\n											<ul class=\"dropdown-menu dropdown-animation\">\r\n												<li class=\"twitter\"><a target=\"_blank\" href=\"http://www.twitter.com\"><i class=\"fa fa-twitter\"></i></a></li>												\r\n												<li class=\"linkedin\"><a target=\"_blank\" href=\"http://www.linkedin.com\"><i class=\"fa fa-linkedin\"></i></a></li>\r\n												<li class=\"googleplus\"><a target=\"_blank\" href=\"http://plus.google.com\"><i class=\"fa fa-google-plus\"></i></a></li>\r\n												<li class=\"facebook\"><a target=\"_blank\" href=\"http://www.facebook.com\"><i class=\"fa fa-facebook\"></i></a></li>\r\n											</ul>\r\n										</div>\r\n									</div>\r\n									<ul class=\"list-inline hidden-sm hidden-xs\">\r\n										<li></li>\r\n										<li><i class=\"fa fa-phone pr-5 pl-10\"></i>4008-050-021</li>									\r\n									</ul>\r\n								</div>\r\n								<!-- header-top-first end -->\r\n							</div>\r\n							<div class=\"col-xs-9 col-sm-6 col-md-3\">\r\n\r\n								<!-- header-top-second start -->\r\n								<!-- ================ -->\r\n								<div id=\"header-top-second\"  class=\"clearfix\">\r\n									<!-- header top dropdowns start -->\r\n									<!-- ================ -->\r\n									<div class=\"header-top-dropdown text-right\">\r\n										<!--<div class=\"btn-group\">\r\n											<a href=\"#\" class=\"btn btn-default btn-sm\"><i class=\"fa fa-user pr-10\"></i>企业注册</a>\r\n										</div>  -->                                     \r\n										<div class=\"btn-group dropdown\">\r\n                                        <a href=\"http://www.bestfbi.com.cn/TradeInfo/Index.aspx\" class=\"btn dropdown-toggle btn-default btn-sm\"><i class=\"fa fa-lock pr-10\"></i>企业登录</a>										\r\n										</div>\r\n									</div>\r\n									<!--  header top dropdowns end -->\r\n								</div>\r\n								<!-- header-top-second end -->\r\n							</div>\r\n						</div>\r\n					</div>\r\n				</div>\r\n				<!-- header-top end -->\r\n				\r\n				<!-- header start -->\r\n				<!-- classes:  -->\r\n				<!-- \"fixed\": enables fixed navigation mode (sticky menu) e.g. class=\"header fixed clearfix\" -->\r\n				<!-- \"dark\": dark version of header e.g. class=\"header dark clearfix\" -->\r\n				<!-- \"full-width\": mandatory class for the full-width menu layout -->\r\n				<!-- \"centered\": mandatory class for the centered logo layout -->\r\n				<!-- ================ --> \r\n				<header class=\"header  fixed   clearfix\">\r\n					\r\n					<div class=\"container\">\r\n						<div class=\"row\">\r\n							<div class=\"col-md-3\">\r\n								<!-- header-left start -->\r\n								<!-- ================ -->\r\n								<div class=\"header-left clearfix\">\r\n\r\n									<!-- logo -->\r\n									<div id=\"logo\" class=\"logo\">\r\n										<a href=\"index.html\"><img id=\"logo_img\" src=\"images/logo.png\" alt=\"The Project\"></a>\r\n									</div>\r\n								</div>\r\n								<!-- header-left end -->\r\n\r\n							</div>\r\n							<div class=\"col-md-9\">\r\n					\r\n								<!-- header-right start -->\r\n								<!-- ================ -->\r\n								<div class=\"header-right clearfix\">\r\n									\r\n								<!-- main-navigation start -->\r\n								<!-- classes: -->\r\n								<!-- \"onclick\": Makes the dropdowns open on click, this the default bootstrap behavior e.g. class=\"main-navigation onclick\" -->\r\n								<!-- \"animated\": Enables animations on dropdowns opening e.g. class=\"main-navigation animated\" -->\r\n								<!-- \"with-dropdown-buttons\": Mandatory class that adds extra space, to the main navigation, for the search and cart dropdowns -->\r\n								<!-- ================ -->\r\n								<div class=\"main-navigation  animated with-dropdown-buttons\">\r\n\r\n									<!-- navbar start -->\r\n									<!-- ================ -->\r\n									<nav class=\"navbar navbar-default\" role=\"navigation\">\r\n										<div class=\"container-fluid\">\r\n\r\n											<!-- Toggle get grouped for better mobile display -->\r\n											<div class=\"navbar-header\">\r\n												<button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\"#navbar-collapse-1\">\r\n													<span class=\"sr-only\">Toggle navigation</span>\r\n													<span class=\"icon-bar\"></span>\r\n													<span class=\"icon-bar\"></span>\r\n													<span class=\"icon-bar\"></span>\r\n												</button>\r\n												\r\n											</div>\r\n											<!-- Collect the nav links, forms, and other content for toggling -->\r\n											<div class=\"collapse navbar-collapse\" id=\"navbar-collapse-1\">\r\n												<!-- main-menu -->\r\n												<ul class=\"nav navbar-nav \">	                                               \r\n	                                                <li class=\"mega-menu\" style=\"font-family: Microsoft YaHei;font-weight: 500\"><a href=\"index.html\">首页</a>\r\n	                                                </li>\r\n                                                      <li class=\"mega-menu\" style=\"font-family: Microsoft YaHei;font-weight: 500\"><a href=\"service.html\">服务方案和优势</a>\r\n	                                                </li>	\r\n	                                                <li class=\"mega-menu\" style=\"font-family: Microsoft YaHei;font-weight: 500\"><a href=\"aboutus.html\">关于我们</a>\r\n	                                                </li>                                     \r\n	                                                <li class=\"mega-menu\" style=\"font-family: Microsoft YaHei;font-weight: 500\"><a href=\"news.html\">行业动态</a>\r\n	                                                </li>	                                             \r\n	                                                <li class=\"mega-menu\" style=\"font-family: Microsoft YaHei;font-weight: 500\"><a href=\"contact.html\">联系我们</a>\r\n	                                                </li>\r\n                                                </ul>\r\n												<!-- main-menu end -->												\r\n												<!-- header dropdown buttons -->\r\n												<div class=\"header-dropdown-buttons hidden-xs \">	</div>\r\n												<!-- header dropdown buttons end-->												\r\n											</div>\r\n\r\n										</div>\r\n									</nav>\r\n									<!-- navbar end -->\r\n\r\n								</div>\r\n								<!-- main-navigation end -->	\r\n								</div>\r\n								<!-- header-right end -->\r\n					\r\n							</div>\r\n						</div>\r\n					</div>\r\n					\r\n				</header>\r\n				<!-- header end -->\r\n			</div>\r\n			<!-- header-container end -->");


	templateBuilder.Append("\r\n<!--/Header-->\r\n\r\n<div class=\"boxwrap\">\r\n  <div class=\"left180\">\r\n    <!--Sidebar-->\r\n    ");

	templateBuilder.Append("    <div class=\"sidebar\">\r\n      <h3>交易管理</h3>\r\n      <ul>\r\n        <li><a href=\"");
	templateBuilder.Append(linkurl("userorder","list"));

	templateBuilder.Append("\">交易订单</a></li>\r\n        <li><a href=\"");
	templateBuilder.Append(linkurl("userorder","close"));

	templateBuilder.Append("\">已关闭订单</a></li>\r\n      </ul>\r\n      <h3>账户管理</h3>\r\n      <ul>\r\n        <li><a href=\"");
	templateBuilder.Append(linkurl("useramount","recharge"));

	templateBuilder.Append("\">账户余额</a></li>\r\n        <li><a href=\"");
	templateBuilder.Append(linkurl("userpoint","convert"));

	templateBuilder.Append("\">我的积分</a></li>\r\n        <li><a href=\"");
	templateBuilder.Append(linkurl("usermessage","system"));

	templateBuilder.Append("\">站内短信</a></li>\r\n        <li><a href=\"");
	templateBuilder.Append(linkurl("usercenter","invite"));

	templateBuilder.Append("\">邀请码</a></li>\r\n      </ul>\r\n      <h3>基本资料</h3>\r\n      <ul>\r\n        <li><a href=\"");
	templateBuilder.Append(linkurl("usercenter","proinfo"));

	templateBuilder.Append("\">个人资料</a></li>\r\n        <li><a href=\"");
	templateBuilder.Append(linkurl("usercenter","password"));

	templateBuilder.Append("\">修改密码</a></li>\r\n        <li><a href=\"");
	templateBuilder.Append(linkurl("usercenter","exit"));

	templateBuilder.Append("\">退出登录</a></li>\r\n      </ul>\r\n    </div>");


	templateBuilder.Append("\r\n    <!--/Sidebar-->\r\n  </div>\r\n  \r\n  <div class=\"right757\">\r\n    ");
	if (action=="index")
	{

	templateBuilder.Append("\r\n    <!--会员中心-->\r\n    <h1 class=\"main_tit\">\r\n      <span><a href=\"");
	templateBuilder.Append(linkurl("usercenter","exit"));

	templateBuilder.Append("\">退出</a></span>\r\n      会员中心\r\n      <strong>Profile</strong>\r\n    </h1>\r\n    <!--会员中心-->\r\n    <div class=\"main_head\">\r\n      <div class=\"avatarbox\">\r\n        ");
	if (userModel.avatar!="")
	{

	templateBuilder.Append("\r\n        <img src=\"");
	templateBuilder.Append(Utils.ObjectToStr(userModel.avatar));
	templateBuilder.Append("\" />\r\n        ");
	}
	else
	{

	templateBuilder.Append("\r\n        <img src=\"");
	templateBuilder.Append("/templates/green");
	templateBuilder.Append("/images/user_avatar.png\" alt=\"求真像\" />\r\n        ");
	}	//end for if

	templateBuilder.Append("\r\n        <span><a href=\"");
	templateBuilder.Append(linkurl("usercenter","avatar"));

	templateBuilder.Append("\">设置头像</a></span>\r\n      </div>\r\n      <div class=\"tips_box\">\r\n        <h3>尊敬的<span class=\"red\">");
	templateBuilder.Append(Utils.ObjectToStr(userModel.user_name));
	templateBuilder.Append("</span>，欢迎您！</h3>\r\n        <dl>\r\n          <dt>会员等级：</dt>\r\n          <dd>");
	templateBuilder.Append(Utils.ObjectToStr(groupModel.title));
	templateBuilder.Append("</dd>\r\n        </dl>\r\n        <dl>\r\n          <dt>个人成长值：</dt>\r\n          <dd>");
	templateBuilder.Append(Utils.ObjectToStr(userModel.exp));
	templateBuilder.Append("点</dd>\r\n        </dl>\r\n        \r\n        <dl>\r\n          <dt>本次登录IP：</dt>\r\n          <dd>");
	templateBuilder.Append(Utils.ObjectToStr(curr_login_ip));
	templateBuilder.Append("</dd>\r\n        </dl>\r\n        <dl>\r\n          <dt>上次登录IP：</dt>\r\n          <dd>");
	templateBuilder.Append(Utils.ObjectToStr(pre_login_ip));
	templateBuilder.Append("</dd>\r\n        </dl>\r\n        <dl>\r\n          <dt>注册时间：</dt>\r\n          <dd>");
	templateBuilder.Append(Utils.ObjectToStr(userModel.reg_time));
	templateBuilder.Append("</dd>\r\n        </dl>\r\n        <dl>\r\n          <dt>上次登录时间：</dt>\r\n          <dd>");
	templateBuilder.Append(Utils.ObjectToStr(pre_login_time));
	templateBuilder.Append("</dd>\r\n        </dl>\r\n      </div>\r\n    </div>\r\n    <div class=\"line20\"></div>\r\n    <div class=\"tips_box\">\r\n      <h2>账户统计</h2>\r\n      <dl>\r\n        <dt>账户余额：</dt>\r\n        <dd><b class=\"red\">￥");
	templateBuilder.Append(Utils.ObjectToStr(userModel.amount));
	templateBuilder.Append("</b> 元</dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>账户积分：</dt>\r\n        <dd><b class=\"red\">");
	templateBuilder.Append(Utils.ObjectToStr(userModel.point));
	templateBuilder.Append("</b> 分</dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>未完成订单：</dt>\r\n        <dd><b class=\"red\">");
	templateBuilder.Append(get_user_order_count("status<3 and user_id="+userModel.id).ToString());

	templateBuilder.Append("</b> 个</dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>未读短信：</dt>\r\n        <dd><b class=\"red\">");
	templateBuilder.Append(get_user_message_count("type<3 and is_read=0 and accept_user_name='"+userModel.user_name+"'").ToString());

	templateBuilder.Append("</b>条</dd>\r\n      </dl>\r\n    </div>\r\n    <!--/会员中心-->\r\n    ");
	}
	else if (action=="password")
	{

	templateBuilder.Append("\r\n    <!--修改密码-->\r\n    <link rel=\"stylesheet\" href=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("css/validate.css\" />\r\n    <script type=\"text/javascript\" src=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("scripts/jquery/jquery.form.min.js\"></");
	templateBuilder.Append("script>\r\n    <script type=\"text/javascript\" src=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("scripts/jquery/Validform_v5.3.2_min.js\"></");
	templateBuilder.Append("script>\r\n    <script type=\"text/javascript\">\r\n      $(function(){\r\n	    //初始化表单\r\n		AjaxInitForm('pwd_form', 'btnSubmit', 1);\r\n	  });\r\n    </");
	templateBuilder.Append("script>\r\n    <h1 class=\"main_tit\">\r\n      <span><a href=\"");
	templateBuilder.Append(linkurl("usercenter","index"));

	templateBuilder.Append("\">管理首页</a></span>\r\n      修改密码\r\n      <strong>Password</strong>\r\n    </h1>\r\n    <form name=\"pwd_form\" id=\"pwd_form\" url=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("tools/submit_ajax.ashx?action=user_password_edit\">\r\n    <div class=\"form_box\">\r\n      <dl>\r\n        <dt>用户名：</dt>\r\n        <dd>");
	templateBuilder.Append(Utils.ObjectToStr(userModel.user_name));
	templateBuilder.Append("</dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>旧密码：</dt>\r\n        <dd><input name=\"txtOldPassword\" id=\"txtOldPassword\" type=\"password\" class=\"input txt\" datatype=\"*6-20\" nullmsg=\"请输入旧密码\" errormsg=\"密码范围在6-20位之间\" sucmsg=\" \" /></dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>新密码：</dt>\r\n        <dd><input name=\"txtPassword\" id=\"txtPassword\" type=\"password\" class=\"input txt\" datatype=\"*6-20\" nullmsg=\"请输入密码\" errormsg=\"密码范围在6-20位之间\" sucmsg=\" \" /></dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>确认新密码：</dt>\r\n        <dd><input name=\"txtPassword1\" id=\"txtPassword1\" type=\"password\" class=\"input txt\" datatype=\"*\" recheck=\"txtPassword\" nullmsg=\"请再输入一次密码\" errormsg=\"两次输入的密码不一致\" sucmsg=\" \" /></dd>\r\n      </dl>\r\n      <dl>\r\n        <dt></dt>\r\n        <dd><input name=\"btnSubmit\" id=\"btnSubmit\" type=\"submit\" class=\"btn_submit\" value=\"确认修改\" /></dd>\r\n      </dl>\r\n    </div>\r\n    </form>\r\n    <!--/修改密码-->\r\n    ");
	}
	else if (action=="proinfo")
	{

	templateBuilder.Append("\r\n    <!--修改资料-->\r\n    <link rel=\"stylesheet\" href=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("css/validate.css\" />\r\n    <script type=\"text/javascript\" src=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("scripts/jquery/jquery.form.min.js\"></");
	templateBuilder.Append("script>\r\n    <script type=\"text/javascript\" src=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("scripts/jquery/Validform_v5.3.2_min.js\"></");
	templateBuilder.Append("script>\r\n    <script type=\"text/javascript\">\r\n      $(function(){\r\n	    //初始化表单\r\n		AjaxInitForm('info_form', 'btnSubmit', 1);\r\n	  });\r\n    </");
	templateBuilder.Append("script>\r\n    <form name=\"info_form\" id=\"info_form\" url=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("tools/submit_ajax.ashx?action=user_info_edit\">\r\n    <h1 class=\"main_tit\">\r\n      <span><a href=\"");
	templateBuilder.Append(linkurl("usercenter","index"));

	templateBuilder.Append("\">管理首页</a></span>\r\n      个人资料\r\n      <strong>Information</strong>\r\n    </h1>\r\n    \r\n    <div class=\"form_box\">\r\n      <dl>\r\n        <dt>用户名：</dt>\r\n        <dd>");
	templateBuilder.Append(Utils.ObjectToStr(userModel.user_name));
	templateBuilder.Append("</dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>Email：</dt>\r\n        <dd><input name=\"txtEmail\" id=\"txtEmail\" type=\"text\" class=\"input txt\" maxlength=\"50\" value=\"");
	templateBuilder.Append(Utils.ObjectToStr(userModel.email));
	templateBuilder.Append("\" readonly=\"readonly\" datatype=\"e\" sucmsg=\" \" /></dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>昵称：</dt>\r\n        <dd><input name=\"txtNickName\" id=\"txtNickName\" type=\"text\" class=\"input txt\" value=\"");
	templateBuilder.Append(Utils.ObjectToStr(userModel.nick_name));
	templateBuilder.Append("\" datatype=\"*\" sucmsg=\" \" /></dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>性别：</dt>\r\n        <dd>\r\n          ");
	if (userModel.sex=="男")
	{

	templateBuilder.Append("\r\n            <label><input name=\"rblSex\" type=\"radio\" value=\"男\" checked=\"checked\" />男</label> \r\n            <label><input name=\"rblSex\" type=\"radio\" value=\"女\" />女</label>\r\n            <label><input name=\"rblSex\" type=\"radio\" value=\"保密\" datatype=\"*\" sucmsg=\" \" />保密</label>\r\n            ");
	}
	else if (userModel.sex=="女")
	{

	templateBuilder.Append("\r\n            <label><input name=\"rblSex\" type=\"radio\" value=\"男\" />男</label>\r\n            <label><input name=\"rblSex\" type=\"radio\" value=\"女\" checked=\"checked\" />女</label>\r\n            <label><input name=\"rblSex\" type=\"radio\" value=\"保密\" datatype=\"*\" sucmsg=\" \" />保密</label>\r\n            ");
	}
	else
	{

	templateBuilder.Append("\r\n            <label><input name=\"rblSex\" type=\"radio\" value=\"男\" />男</label>\r\n            <label><input name=\"rblSex\" type=\"radio\" value=\"女\" />女</label>\r\n            <label><input name=\"rblSex\" type=\"radio\" value=\"保密\" checked=\"checked\" datatype=\"*\" sucmsg=\" \" />保密</label>\r\n            ");
	}	//end for if

	templateBuilder.Append("\r\n        </dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>生日：</dt>\r\n        <dd>\r\n          ");
	if (userModel.birthday==null)
	{

	templateBuilder.Append("\r\n          <input name=\"txtBirthday\" id=\"txtBirthday\" type=\"text\" class=\"input txt required dateISO\" maxlength=\"30\" onclick=\"return Calendar('txtBirthday');\" />\r\n          ");
	}
	else
	{

	templateBuilder.Append("\r\n          <input name=\"txtBirthday\" id=\"txtBirthday\" type=\"text\" class=\"input txt required dateISO\" maxlength=\"30\" onclick=\"new Calendar().show(this);\" value=\"");	templateBuilder.Append(Utils.ObjectToDateTime(userModel.birthday).ToString("yyyy-M-d"));

	templateBuilder.Append("\" />\r\n          ");
	}	//end for if

	templateBuilder.Append("\r\n        </dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>联系电话：</dt>\r\n        <dd><input name=\"txtTelphone\" id=\"txtTelphone\" type=\"text\" class=\"input txt\" maxlength=\"50\" value=\"");
	templateBuilder.Append(Utils.ObjectToStr(userModel.telphone));
	templateBuilder.Append("\" /></dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>手机号码：</dt>\r\n        <dd><input name=\"txtMobile\" id=\"txtMobile\" type=\"text\" class=\"input txt\" maxlength=\"20\" value=\"");
	templateBuilder.Append(Utils.ObjectToStr(userModel.mobile));
	templateBuilder.Append("\" datatype=\"*\" sucmsg=\" \" /></dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>在线QQ：</dt>\r\n        <dd><input name=\"txtQQ\" id=\"txtQQ\" type=\"text\" class=\"input txt\" maxlength=\"20\" value=\"");
	templateBuilder.Append(Utils.ObjectToStr(userModel.qq));
	templateBuilder.Append("\" /></dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>联系地址：</dt>\r\n        <dd><input name=\"txtAddress\" id=\"txtAddress\" type=\"text\" class=\"input wide\" maxlength=\"250\" value=\"");
	templateBuilder.Append(Utils.ObjectToStr(userModel.address));
	templateBuilder.Append("\" /></dd>\r\n      </dl>\r\n      <dl>\r\n        <dt></dt>\r\n        <dd><input name=\"btnSubmit\" id=\"btnSubmit\" type=\"submit\" class=\"btn_submit\" value=\"确认修改\" /></dd>\r\n      </dl>\r\n    </div>\r\n    </form>\r\n    <!--/修改资料-->\r\n    ");
	}
	else if (action=="avatar")
	{

	templateBuilder.Append("\r\n    <!--设置头像-->\r\n    <link rel=\"stylesheet\" href=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("css/jquery.jcrop.css\" type=\"text/css\" />\r\n    <script type=\"text/javascript\" src=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("scripts/jquery/jquery.form.min.js\"></");
	templateBuilder.Append("script>\r\n    <script src=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("scripts/jquery/jquery.jcrop.min.js\" type=\"text/javascript\"></");
	templateBuilder.Append("script>\r\n    <script src=\"");
	templateBuilder.Append("/templates/green");
	templateBuilder.Append("/js/avatar.js\" type=\"text/javascript\"></");
	templateBuilder.Append("script>\r\n    <h1 class=\"main_tit\">\r\n      <span><a href=\"");
	templateBuilder.Append(linkurl("usercenter","index"));

	templateBuilder.Append("\">管理首页</a></span>\r\n      头像设置\r\n      <strong>Avatar</strong>\r\n    </h1>\r\n    \r\n    <strong>当前我的头像</strong>\r\n    <p>如果您还没有设置自己的头像，系统会显示为默认头像，您需要自己上传一张新照片来作为自己的个人头像。</p>\r\n    <div class=\"img_box\">\r\n      ");
	if (userModel.avatar!="")
	{

	templateBuilder.Append("\r\n        <img src=\"");
	templateBuilder.Append(Utils.ObjectToStr(userModel.avatar));
	templateBuilder.Append("\" width=\"180\" height=\"180\" />\r\n      ");
	}
	else
	{

	templateBuilder.Append("\r\n        <img src=\"");
	templateBuilder.Append("/templates/green");
	templateBuilder.Append("/images/user_avatar.png\" width=\"180\" height=\"180\" />\r\n      ");
	}	//end for if

	templateBuilder.Append("\r\n    </div>\r\n    <strong>设置我的新头像</strong>\r\n    <p>上传成功后，请裁剪合适的头像确认保存后才能生效。</p>\r\n    <form id=\"upload_form\" name=\"upload_form\">\r\n      <div class=\"avatar_upload\">\r\n        <a href=\"javascript:;\" class=\"files\"><input type=\"file\" id=\"Filedata\" name=\"Filedata\" onchange=\"Upload('");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("');\" /></a>\r\n        <span class=\"uploading\">正在上传，请稍候...</span>\r\n      </div>\r\n      <div class=\"clear\"></div>\r\n      <div class=\"avatar_box\">\r\n        <div class=\"avatar_big_warp\">\r\n          <div class=\"avatar_big_box\">\r\n            <div class=\"avatar_big_pic\">\r\n              <img id=\"target\" src=\"");
	templateBuilder.Append("/templates/green");
	templateBuilder.Append("/images/pic_bg.png\" />\r\n            </div>\r\n          </div>\r\n        </div>\r\n        <div class=\"avatar_small_warp\">\r\n          <div class=\"avatar_small_box\">\r\n            <div class=\"avatar_small_pic\"><img id=\"preview\" src=\"");
	templateBuilder.Append("/templates/green");
	templateBuilder.Append("/images/pic_bg.png\" /></div>\r\n          </div>\r\n          <p style=\"text-align:center;\"><strong>头像预览区</strong></p>\r\n          <p style=\"text-align:center;\"><input id=\"btnSubmit\" name=\"btnSubmit\" type=\"button\" class=\"btn btn-success\" value=\"确定保存\" onclick=\"CropSubmit('");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("');return false;\" /></p>\r\n          <p>提示：生成头像大小180*180相素上传图片后，左侧选取图片合适大小，点击下面的保存按钮。</p>\r\n        </div>\r\n      </div>\r\n      <input id=\"hideFileName\" name=\"hideFileName\" type=\"hidden\" />\r\n      <input id=\"hideX1\" name=\"hideX1\" type=\"hidden\" value=\"0\" />\r\n      <input id=\"hideY1\" name=\"hideY1\" type=\"hidden\" value=\"0\" />\r\n      <input id=\"hideWidth\" name=\"hideWidth\" type=\"hidden\" value=\"0\" />\r\n      <input id=\"hideHeight\" name=\"hideHeight\" type=\"hidden\" value=\"0\" />\r\n    </form>\r\n    <!--/设置头像-->\r\n    ");
	}
	else if (action=="invite")
	{

	templateBuilder.Append("\r\n    <!--邀请码-->\r\n    <h1 class=\"main_tit\">\r\n      <span><a href=\"javascript:;\" onclick=\"clickSubmit('");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("tools/submit_ajax.ashx?action=user_invite_code');\">申请邀请码</a></span>\r\n      我的邀请码\r\n      <strong>Invite</strong>\r\n    </h1>\r\n    \r\n    <p>说明：您购买的邀请码会在失效之后由系统定时清理，不会长期驻留在列表中</p>\r\n    <div class=\"line10\"></div>\r\n    <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"ftable\">\r\n      <tr>\r\n        <th align=\"left\">邀请码</th>\r\n        <th width=\"150\">申请时间</th>\r\n        <th width=\"150\">过期时间</th>\r\n        <th width=\"80\">已使用次数</th>\r\n        <th width=\"80\">状态</th>\r\n      </tr>\r\n      ");
	DataTable list1 = get_user_invite_list(0, "user_name='"+userModel.user_name+"'");

	templateBuilder.Append(" <!--取得一个DataTable-->\r\n      ");
	int dr__loop__id=0;
	foreach(DataRow dr in list1.Rows)
	{
		dr__loop__id++;


	templateBuilder.Append("\r\n      <tr>\r\n        <td>" + Utils.ObjectToStr(dr["str_code"]) + " &nbsp; <a href=\"javascript:;\" onclick=\"copyText('邀请码：" + Utils.ObjectToStr(dr["str_code"]) + "');\">[复制]</a></td>\r\n        <td align=\"center\">" + Utils.ObjectToStr(dr["add_time"]) + "</td>\r\n        <td align=\"center\">\r\n          ");
	if (Utils.ObjectToStr(dr["eff_time"])=="")
	{

	templateBuilder.Append("\r\n          无限制\r\n          ");
	}
	else
	{

	templateBuilder.Append("\r\n          " + Utils.ObjectToStr(dr["eff_time"]) + "\r\n          ");
	}	//end for if

	templateBuilder.Append("\r\n        </td>\r\n        <td align=\"center\">" + Utils.ObjectToStr(dr["count"]) + "</td>\r\n        <td align=\"center\">\r\n          ");
	if (get_invite_status(Utils.ObjectToStr(dr["str_code"])))
	{

	templateBuilder.Append("\r\n          有效\r\n          ");
	}
	else
	{

	templateBuilder.Append("\r\n          已失效\r\n          ");
	}	//end for if

	templateBuilder.Append("\r\n        </td>\r\n      </tr>\r\n      ");
	}	//end for if

	if (list1.Rows.Count<1)
	{

	templateBuilder.Append("\r\n      <tr><td align=\"center\" colspan=\"5\">暂无记录</td></tr>\r\n      ");
	}	//end for if

	templateBuilder.Append("\r\n    </table>\r\n    <!--/邀请码-->\r\n    ");
	}	//end for if

	templateBuilder.Append("\r\n    \r\n  </div>\r\n  <div class=\"clear\"></div>\r\n</div>\r\n\r\n<div class=\"clear\"></div>\r\n\r\n<!--Footer-->\r\n");

	templateBuilder.Append("<!-- footer start (Add \"dark\" class to #footer in order to enable dark footer) -->\r\n			<!-- ================ -->\r\n			\r\n			<footer id=\"footer\" class=\"clearfix dark\">\r\n             	<!-- .footer start -->\r\n				<!-- ================ -->\r\n				<div class=\"footer\">\r\n                \r\n					<div class=\"container\">\r\n                   \r\n						<div class=\"footer-inner\">\r\n                      \r\n							<div class=\"row\">\r\n								<div class=\"col-md-6\">\r\n									<div class=\"footer-content\">\r\n										<div class=\"logo-footer\"></div>\r\n										\r\n										<ul class=\"list-inline mb-20\">\r\n											<li style=\"margin-left: 10px\"><i class=\"text-default fa fa-map-marker pr-5\"></i>&nbsp;上海市共和新路4695号万达广场4号楼17楼</li></br>\r\n											<li><i class=\"text-default fa fa-phone pl-10 pr-5\"></i>&nbsp;4008-050-021</li></br>\r\n											<li><i class=\"text-default fa fa-envelope-o pl-10 pr-5\"></i>&nbsp;it@bestfbi.com</a></li>\r\n										</ul>\r\n										<div class=\"separator-2\"></div>\r\n										<ul class=\"social-links circle margin-clear animated-effect-1\">\r\n											<li class=\"facebook\"><a target=\"_blank\" href=\"http://www.facebook.com\"><i class=\"fa fa-facebook\"></i></a></li>\r\n											<li class=\"twitter\"><a target=\"_blank\" href=\"http://www.twitter.com\"><i class=\"fa fa-twitter\"></i></a></li>\r\n											<li class=\"googleplus\"><a target=\"_blank\" href=\"http://plus.google.com\"><i class=\"fa fa-google-plus\"></i></a></li>\r\n											<li class=\"linkedin\"><a target=\"_blank\" href=\"http://www.linkedin.com\"><i class=\"fa fa-linkedin\"></i></a></li>\r\n										</ul>\r\n									</div>\r\n								</div>\r\n								<div class=\"col-md-6\">\r\n									<div class=\"footer-content\">\r\n										<h2 class=\"title\">联系我们</h2>\r\n										 <form action=\"#\" method=\"POST\" class=\"margin-clear\">\r\n											<div class=\"form-group has-feedback mb-10\">\r\n												<label class=\"sr-only\" for=\"name2\">Name</label>\r\n												<input type=\"text\" class=\"form-control\" id=\"name\" placeholder=\"姓名\" name=\"name\">\r\n												<i class=\"fa fa-user form-control-feedback\"></i>\r\n											</div>\r\n											<div class=\"form-group has-feedback mb-10\">\r\n												<label class=\"sr-only\" for=\"email2\">Email address</label>\r\n												<input type=\"email\" class=\"form-control\" id=\"email\" placeholder=\"邮箱\" name=\"email\">\r\n												<i class=\"fa fa-envelope form-control-feedback\"></i>\r\n											</div>\r\n											<div class=\"form-group has-feedback mb-10\">\r\n												<label class=\"sr-only\" for=\"message2\">Message</label>\r\n												<textarea class=\"form-control\" rows=\"4\" id=\"message\" placeholder=\"留言\" name=\"message\"></textarea>\r\n												<i class=\"fa fa-pencil form-control-feedback\"></i>\r\n											</div>\r\n											<button class=\"margin-clear submit-button btn btn-default\" type=\"submit\" style=\"width:140px;\">发送留言</button>\r\n										</form>\r\n									</div>\r\n								</div>\r\n							</div>\r\n						</div>\r\n					</div>\r\n				</div>\r\n				<!-- .footer end -->\r\n\r\n				<!-- .subfooter start -->\r\n				<!-- ================ -->\r\n				<div class=\"subfooter\">\r\n					<div class=\"container\">\r\n						<div class=\"subfooter-inner\">\r\n							<div class=\"row\">\r\n								<div class=\"col-md-12\">\r\n									<p class=\"text-center\">Copyright 2004-2016 Shanghai Bestfbi Intelligence Co., Ltd 沪ICP备13028284号-1\r\n									<br/>\r\nUK USA H.K. Shanghai Guangzhou Ningbo Wenzhou Wuxi Changzhou Dalian Taizhou Dongguan Shijiangzhuang\r\n</p></div>\r\n							</div>\r\n						</div>\r\n					</div>\r\n				</div>\r\n				\r\n				<!-- .subfooter end -->\r\n			</footer>\r\n			<!-- footer end -->\r\n			\r\n		</div>\r\n\r\n	\r\n		<!-- page-wrapper end -->\r\n\r\n		<!-- JavaScript files placed at the end of the document so the pages load faster -->\r\n		<!-- ================================================== -->\r\n		<!-- Jquery and Bootstap core js files -->\r\n		<script type=\"text/javascript\" src=\"plugins/jquery.min.js\"></");
	templateBuilder.Append("script>\r\n		<script type=\"text/javascript\" src=\"bootstrap/js/bootstrap.min.js\"></");
	templateBuilder.Append("script>\r\n\r\n		<!-- Modernizr javascript -->\r\n		<script type=\"text/javascript\" src=\"plugins/modernizr.js\"></");
	templateBuilder.Append("script>\r\n\r\n		<!-- jQuery Revolution Slider  -->\r\n		<script type=\"text/javascript\" src=\"plugins/rs-plugin/js/jquery.themepunch.tools.min.js\"></");
	templateBuilder.Append("script>\r\n		<script type=\"text/javascript\" src=\"plugins/rs-plugin/js/jquery.themepunch.revolution.min.js\"></");
	templateBuilder.Append("script>\r\n\r\n		\r\n		\r\n\r\n		<!-- Isotope javascript -->\r\n		<script type=\"text/javascript\" src=\"plugins/isotope/isotope.pkgd.min.js\"></");
	templateBuilder.Append("script>\r\n		\r\n		<!-- Magnific Popup javascript -->\r\n		<script type=\"text/javascript\" src=\"plugins/magnific-popup/jquery.magnific-popup.min.js\"></");
	templateBuilder.Append("script>\r\n		\r\n		<!-- Appear javascript -->\r\n		<script type=\"text/javascript\" src=\"plugins/waypoints/jquery.waypoints.min.js\"></");
	templateBuilder.Append("script>\r\n\r\n		<!-- Count To javascript -->\r\n		<script type=\"text/javascript\" src=\"plugins/jquery.countTo.js\"></");
	templateBuilder.Append("script>\r\n		\r\n		<!-- Parallax javascript -->\r\n		<script src=\"plugins/jquery.parallax-1.1.3.js\"></");
	templateBuilder.Append("script>\r\n\r\n		<!-- Contact form -->\r\n		<script src=\"plugins/jquery.validate.js\"></");
	templateBuilder.Append("script>\r\n\r\n		<!-- Background Video -->\r\n		<script src=\"plugins/vide/jquery.vide.js\"></");
	templateBuilder.Append("script>\r\n\r\n		<!-- Owl carousel javascript -->\r\n		<script type=\"text/javascript\" src=\"plugins/owl-carousel/owl.carousel.js\"></");
	templateBuilder.Append("script>\r\n		\r\n		<!-- SmoothScroll javascript -->\r\n		<script type=\"text/javascript\" src=\"plugins/jquery.browser.js\"></");
	templateBuilder.Append("script>\r\n		<script type=\"text/javascript\" src=\"plugins/SmoothScroll.js\"></");
	templateBuilder.Append("script>\r\n\r\n		<!-- Initialization of Plugins -->\r\n		<script type=\"text/javascript\" src=\"js/template.js\"></");
	templateBuilder.Append("script>\r\n\r\n		<!-- Custom Scripts -->\r\n		<script type=\"text/javascript\" src=\"js/custom.js\"></");
	templateBuilder.Append("script>");


	templateBuilder.Append("\r\n<!--/Footer-->\r\n</body>\r\n</html>\r\n");
	Response.Write(templateBuilder.ToString());
}
</script>
